<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <form action="http://localhost:3000/api/users/login" method="POST">
        <div>
            <input type="text" name="username" placeholder="请输入用户名">
        </div>
        <div>
            <input type="password" name="password" placeholder="请输入密码">
        </div>
        <div>
            <input type="text" name="captcha" placeholder="请输入验证码">
            <img src="http://localhost:3000/api/users/captcha" id="imgBtn">
        </div>
        <div>
            <button>登录</button>
        </div>
    </form>
    <script>
        var oBtn = document.querySelector('#imgBtn')
        oBtn.onclick = function(){
            this.src = 'http://localhost:3000/api/users/captcha?t'+ new Date().getTime()
        }
    </script>
</body>
</html>